package com.lastfm.handler;

import java.net.MalformedURLException;
import java.net.URL;

public class ArtistHandler extends InfoHandler implements HandlerLastFM{

	private String artist_name;
	
	public ArtistHandler(String artist_name){
		this.artist_name = artist_name;
	}
	
	
	public URL getUrl(String format) throws MalformedURLException {
		if(format.equals("json"))
			return new URL("http://ws.audioscrobbler.com/2.0/?method=artist.getinfo&artist="+artist_name+"&api_key="+api_key+"&format=json");
		else return new URL("http://ws.audioscrobbler.com/2.0/?method=artist.getinfo&artist="+artist_name+"&api_key="+api_key);
	}

	
}
